package com.grablist.feihu.grablist.ui.actviity.user.biz;

import java.util.List;
import java.util.Map;

import com.grablist.feihu.grablist.base.BaseBiz;
import com.grablist.feihu.grablist.base.BaseResp;
import com.grablist.feihu.grablist.comm.BaseSubscribe2;
import com.grablist.feihu.grablist.comm.RetrofitHelp;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by admin on 2017/12/2.
 */

public class CertificationBiz extends BaseBiz {


    /**
     * 个人中心认证
     * @param map
     * @param parts
     * @param callback
     */
    public void setInfo(Map<String, RequestBody> map, List<MultipartBody.Part> parts, final BaseBiz.Callback<Object> callback) {
        com.add(RetrofitHelp.getSecretApi().userCheck2(map,parts)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new BaseSubscribe2<BaseResp<Object>>() {

                    @Override
                    public void onSuccess(Object obj) {
                        callback.onSuccess((Object) obj);
                    }

                    @Override
                    public void onFailure(Object obj) {
                        callback.onFailure((Object) obj);
                    }
                })
        );
    }

}



